#ifndef PUSHSERVER_CONFIG_H
#define PUSHSERVER_CONFIG_H

#include <fstream>
#include <string>
#include <nlohmann/json.hpp>

using namespace std;
using namespace nlohmann;


class Config {
    const char *path;
public:
    pair<bool, string> _success;

    explicit Config(const char *path);

protected:
    void set_fail();
};

class ServerConfig : public Config {
public:
    string host;
    uint16_t listen_port;

    explicit ServerConfig(const char *path);
};

class SQLServerConfig : public Config {
public:
    string host;
    uint16_t port;
    string username;
    string password;
    string database;

    explicit SQLServerConfig(const char *path);
};

#endif //PUSHSERVER_CONFIG_H
